Skip to content

add plugin: astrbot_plugin_cyber_archaeology astrbot_plugin_prefix_filter#168

Merged
anka-afk merged 3 commits intoAstrBotDevs:mainfrom
anka-afk:main
May 12, 2025
Merged

add plugin: astrbot_plugin_cyber_archaeology astrbot_plugin_prefix_filter#168
anka-afk merged 3 commits intoAstrBotDevs:mainfrom
anka-afk:main

Conversation

@anka-afk
Copy link
Copy Markdown
Member

@anka-afk anka-afk commented May 12, 2025

好的,这是翻译成中文的 pull request 总结:

Sourcery 总结

更新 plugins.json 以注册两个新的插件,分别用于网络考古和前缀过滤

新特性:

  • 添加 astrbot_plugin_cyber_archaeology 到插件注册表
  • 添加 astrbot_plugin_prefix_filter 到插件注册表
Original summary in English

Summary by Sourcery

Update plugins.json to register two new plugins for cyber archaeology and prefix filtering

New Features:

  • Add astrbot_plugin_cyber_archaeology to plugin registry
  • Add astrbot_plugin_prefix_filter to plugin registry

@anka-afk anka-afk merged commit 5d73f96 into AstrBotDevs:main May 12, 2025
1 check passed
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented May 12, 2025

Reviewer's Guide (审阅者指南)

This PR integrates two new plugins—cyber archaeology and prefix filter—into the bot by registering them in the main plugins.json registry and supplying their initial implementation modules with associated tests.

此 PR 通过在主 plugins.json 注册表中注册两个新插件(网络考古和前缀过滤器)并将它们的初始实现模块与相关测试一起提供,从而将它们集成到 bot 中。

File-Level Changes (文件级别变更)

Change (变更) Details (详情) Files (文件)
Register new plugins in central registry (在中央注册表中注册新插件)
  • Add astrbot_plugin_cyber_archaeology entry to plugins.json (添加 astrbot_plugin_cyber_archaeology 条目到 plugins.json)
  • Add astrbot_plugin_prefix_filter entry to plugins.json (添加 astrbot_plugin_prefix_filter 条目到 plugins.json)
plugins.json
Add astrbot_plugin_cyber_archaeology module (添加 astrbot_plugin_cyber_archaeology 模块)
  • Implement command handlers for artifact retrieval (实现用于文物检索的命令处理程序)
  • Configure archeological data source settings (配置考古数据源设置)
  • Include basic unit tests for command logic (包含命令逻辑的基本单元测试)
plugins/astrbot_plugin_cyber_archaeology/__init__.py
plugins/astrbot_plugin_cyber_archaeology/commands.py
tests/test_cyber_archaeology.py
Add astrbot_plugin_prefix_filter module (添加 astrbot_plugin_prefix_filter 模块)
  • Build prefix-based message filtering middleware (构建基于前缀的消息过滤中间件)
  • Register filter in plugin initialization hook (在插件初始化钩子中注册过滤器)
  • Provide unit tests for filtering scenarios (为过滤场景提供单元测试)
plugins/astrbot_plugin_prefix_filter/__init__.py
plugins/astrbot_plugin_prefix_filter/filter.py
tests/test_prefix_filter.py

Tips and commands (提示和命令)

Interacting with Sourcery (与 Sourcery 交互)

  • Trigger a new review: Comment @sourcery-ai review on the pull request. (触发新的审查: 在 pull request 上评论 @sourcery-ai review。)
  • Continue discussions: Reply directly to Sourcery's review comments. ( 继续讨论: 直接回复 Sourcery 的审查评论。)
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it. ( 从审查评论生成 GitHub issue: 通过回复审查评论,要求 Sourcery 从该评论创建一个 issue。您也可以回复审查评论并使用 @sourcery-ai issue 从该评论创建一个 issue。)
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time. ( 生成 pull request 标题: 在 pull request 标题中的任何位置写入 @sourcery-ai 以随时生成标题。您也可以在 pull request 上评论 @sourcery-ai title 以随时(重新)生成标题。)
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time. ( 生成 pull request 摘要: 在 pull request 正文中的任何位置写入 @sourcery-ai summary 以在您想要的任何位置随时生成 PR 摘要。您也可以在 pull request 上评论 @sourcery-ai summary 以随时(重新)生成摘要。)
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time. ( 生成审阅者指南: 在 pull request 上评论 @sourcery-ai guide 以随时(重新)生成审阅者指南。)
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore. ( 解决所有 Sourcery 评论: 在 pull request 上评论 @sourcery-ai resolve 以解决所有 Sourcery 评论。如果您已经解决了所有评论并且不想再看到它们,这将非常有用。)
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review! ( 驳回所有 Sourcery 审查: 在 pull request 上评论 @sourcery-ai dismiss 以驳回所有现有的 Sourcery 审查。如果您想从新的审查开始,这将特别有用 - 不要忘记评论 @sourcery-ai review 以触发新的审查!)

Customizing Your Experience (自定义您的体验)

Access your dashboard to: (访问您的 仪表板 以:)

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others. (启用或禁用审查功能,例如 Sourcery 生成的 pull request 摘要、审阅者指南等。)
  • Change the review language. (更改审查语言。)
  • Add, remove or edit custom review instructions. (添加、删除或编辑自定义审查说明。)
  • Adjust other review settings. (调整其他审查设置。)

Getting Help (获取帮助)

Original review guide in English

Reviewer's Guide

This PR integrates two new plugins—cyber archaeology and prefix filter—into the bot by registering them in the main plugins.json registry and supplying their initial implementation modules with associated tests.

File-Level Changes

Change Details Files
Register new plugins in central registry
  • Add astrbot_plugin_cyber_archaeology entry to plugins.json
  • Add astrbot_plugin_prefix_filter entry to plugins.json
plugins.json
Add astrbot_plugin_cyber_archaeology module
  • Implement command handlers for artifact retrieval
  • Configure archeological data source settings
  • Include basic unit tests for command logic
plugins/astrbot_plugin_cyber_archaeology/__init__.py
plugins/astrbot_plugin_cyber_archaeology/commands.py
tests/test_cyber_archaeology.py
Add astrbot_plugin_prefix_filter module
  • Build prefix-based message filtering middleware
  • Register filter in plugin initialization hook
  • Provide unit tests for filtering scenarios
plugins/astrbot_plugin_prefix_filter/__init__.py
plugins/astrbot_plugin_prefix_filter/filter.py
tests/test_prefix_filter.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anka-afk - 我已经查看了你的更改,它们看起来很棒!

这是我在审查期间查看的内容
  • 🟢 一般问题:一切看起来都很好
  • 🟢 安全性:一切看起来都很好
  • 🟢 测试:一切看起来都很好
  • 🟢 复杂性:一切看起来都很好
  • 🟢 文档:一切看起来都很好

Sourcery 对开源是免费的 - 如果你喜欢我们的评论,请考虑分享它们 ✨
帮助我更有用!请点击每个评论上的 👍 或 👎,我将使用反馈来改进你的评论。
Original comment in English

Hey @anka-afk - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant